package com.example.demo.Controller;
import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.Entity.Employee;
import com.example.demo.Entity.User;
import com.example.demo.GeneralResponse.APIResponse;
import com.example.demo.Repository.IUserRepository;
import com.example.demo.Service.EmployeeService;
import com.example.demo.Service.HRService;
import com.example.demo.Service.MailService;

/**
 * @version: V0.3
 * @author: 郑皓杰 吴嘉鑫
 * @className: TestController
 * @packageName: com.example.demo.Controller
 * @description: 这是进行test的控制类，里面的内容并不运用于实际。
 * @data: 2021-07-14
 **/

@RestController
@RequestMapping("/Hello")
public class TestController {
	
	@Autowired
	private EmployeeService empService;
	@Autowired
	private HRService hrService;
	@Autowired
	private MailService mailService;
	@Autowired
	private IUserRepository userRepository;
	
	 @RequestMapping("/Hello")
	 public APIResponse<?> Hello(String to,String subject,String text) throws Throwable{ 
		 
		 mailService.sendTextMail(to,subject,text);
		 return APIResponse.success("successquery","success");
		 
	 }
}
